package page;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * Project Name: mongotest
 * File Name: Page
 * Package Name: com.test.mongo.common.page
 * Date: 2018/4/27  11:15
 * Copyright (c) 2018, tianyul All Rights Reserved.
 * 分页工具
 */
@Data
public class Page<T> implements Serializable {
    private static final long serialVersionUID = -710988882199451208L;

    private Page() {

    }

    public Page(int pageNo, int pageSize, long total, List<T> datas) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.total = total;
        this.datas = datas;
    }

    //当前页
    private int pageNo;
    //每页的数量
    private int pageSize;
    //总记录数
    private long total;
    //结果集
    private List<T> datas;

}
